//
//  CWSportTrackingModel.h
//  大神专制黑马行
//
//  Created by chenWei on 2017/5/11.
//  Copyright © 2017年 陈伟. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "CWSportTrackingLine.h"

//通知
#define kGPSSignalChangeNotification @"kGPSSignalChangeNotification"

//运动方式枚举
typedef enum : NSUInteger {
    SportTypeRun = 1,
    SportTypeWalk,
    SportTypeRide
} SportType;


//运动状态枚举
typedef enum : NSUInteger {
    SportStateContinue = 1,
    SportStatePause,
    SportStateStop
} SportState;


//GPS信号强度枚举
typedef NS_ENUM(NSInteger,HMSportGpsSignalState)
{
    HMSportGpsSignalStateClose = 1,
    HMSportGpsSignalStateBad,
    HMSportGpsSignalStateNormal,
    HMSportGpsSignalStateGood,
    
};



@interface CWSportTrackingModel : NSObject
//运动方式
@property(nonatomic, assign) SportType sportType;

//运动状态
@property(nonatomic, assign) SportState sportState;


//构造方法
- (instancetype)initWithSportType:(SportType)sportType;

- (instancetype)initWithSportType:(SportType)sportType SportState:(SportState)sportState;


//大头针图片
@property(nonatomic, weak, readonly) UIImage *image;


/**
 绘制轨迹线条

 @param location 位置
 @return 返回轨迹线条
 */
- (MAPolyline *)drawPolylineWithLocation:(CLLocation *)location;




//运动总距离
@property(nonatomic,assign,readonly)float totalDistance;

//运动总时间
@property(nonatomic,assign,readonly)float totalTime;

//运动总时间字符串
@property(nonatomic,strong,readonly)NSString *totalTimeStr;

//运动平均速度
@property(nonatomic,assign,readonly)float avgSpeed;

//运动最大速度
@property(nonatomic,assign,readonly)float maxSpeed;

//信号强度
@property(nonatomic, assign, readonly) HMSportGpsSignalState sportGpsSignalState;



@end
